<html>
<head>
<style>
.bar {
    color: red;
}
</style>
<script>
function iframeOnload()
{
    window.parent.iframeLoaded = true;
}
</script>
</head>

<body onload="iframeOnload()">
<div id="bar" class="bar">Bar</div>
</body>

</html>
